package com.rgbgame.physics;

import org.jbox2d.dynamics.Body;
import org.jbox2d.dynamics.BoundaryListener;

/**
 * Calls boundaryViolated(Body) on violation.
 *
 */
class ConcreteBoundaryListener implements BoundaryListener {
	/**
	 * 
	 */
	private PhysicsHandler physicsHandler;

	/**
	 * @param physicsHandler
	 */
	ConcreteBoundaryListener(PhysicsHandler physicsHandler) {
		this.physicsHandler = physicsHandler;
	}

	public void violation(Body body) {
		this.physicsHandler.boundaryViolated(body);
	}
}